{% extends 'base.html' %}
{% block title %}
登录
{% endblock %}
{% block content %}

{% if message %}
<div class="am-container">
    <div class="am-u-sm-12">
        <div class="am-alert am-alert-danger" data-am-alert>
            <button type="button" class="am-close">&times;</button>
            <p>{{ message }}</p>
        </div>
    </div>
</div>
{% endif %}
<div class="am-container">
    <div class="am-u-sm-5 am-u-sm-centered" style="margin-top: 100px;">
        <form class="am-form" method="POST" action="/user/login/">
            {% csrf_token %}
            <fieldset>
                <legend>
                    登录
                </legend>
                <div class="am-form-group">
                    <label for="doc-ipt-name-1">用户名</label>
                    <input type="text" class="" id="doc-ipt-name-1" placeholder="输入用户名" name="username">
                </div>

                <div class="am-form-group">
                    <label for="doc-ipt-pwd-1">密码</label>
                    <input type="password" class="" id="doc-ipt-pwd-1" placeholder="输入密码" name="password">
                </div>
                <a href="{% url 'register' %}"><button type="button" class="am-btn am-btn-default am-radius">注册</button></a>
                <button type="submit" class="am-btn am-btn-primary am-fr am-radius">登录</button>
            </fieldset>
        </form>
    </div>
</div>
{% endblock %}